﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace eWallet.Data.Local
{
	public partial class eWalletDataSet
	{
		public partial class SecretsTagsDataTable
		{

			public IEnumerable<SecretsTagsRow> Select(IEnumerable<SecretsRow> secrets)
			{
				foreach (var item in this)
				{
					if (null == secrets || null != secrets.FirstOrDefault(i => i.Id == item.SecretId))
					{
						yield return item;
					}
				}
			}

			public IEnumerable<SecretsTagsRow> Select(IEnumerable<TagsRow> tags)
			{
				foreach (var item in this)
				{
					if (null == tags || null != tags.FirstOrDefault(t => t.Id == item.TagId))
					{
						yield return item;
					}
				}
			}

		}
	}
}
